/*
Copyright (c) 2008, www.igorcosta.com

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * */
package br.absolutobrasil.utils
{
	/**
	 * Classe util para medição de pesos e medidas Brasileiras
	 * Esta classe foi baseada nas seguintes medidas
	 * /* Medidas de Comprimento
								1 ponto 	0,2mm 	0.007874in.
								1 linha 	2,3mm 	0.09in.
								1 polegada 	2,75cm 	1.08in.
								1 palmo 	22cm 	8.66in.
								1 pé 	33cm 	1.08ft.
								1 côvado 	66cm 	25.98in.
								1 vara 	1,10m 	43.31in.
								1 braça 	2,20m 	86.62in. 
								1 metro  39,37 polegada
		*/
	public class AreaUtil
	{
		include "../core/Versao.as";	
				public function AreaUtil()
				{
					
				}
				
				/**
				 * Converte palmo para centimetros
				 *  @param  valor em Number
				 * */
				 public static function palmoToCentimetro(valor:Number):Number
				 {
				 		valor = valor * 22;
				 	return valor;
				 }
				 public static function centimetroToPalmo(valor:Number):Number
				 {
				 				valor = valor/22;
				 				return valor;
				 }
				 public static function pontoToMilimetro (valor:Number):Number
				 {
				 	valor = valor*0.2;
				 	return valor;
				 }
				 public static function milimetroToPonto(valor:Number):Number
				 {
				 	valor = valor/0.2
				 	return valor;
				 }
				 public static function linhaToMilimetro(valor:Number):Number
				 {
				 		valor = valor * 2.3;
				 		return valor;
				 }
				 public static function milimetroToLinha(valor:Number):Number
				 {
				 		valor = valor/2.3;
				 		return valor;
				 }
				 public static function polegadaToCentimetro(valor:Number):Number
				 {
				 				valor = valor*2.75;
				 				return valor;
				 }
				 public static function centimetroToPolegada(valor:Number):Number
				 {
				 				valor = valor/2.75;
				 				return valor;
				 }
				 public static function  metroToPolegada(valor:Number):Number
				 {
				 					valor = valor * 39.37;
				 					return valor;
				 }
				 public static function polegadaToMetro(valor:Number):Number
				 {
				 					valor = valor / 39.37;
				 					return valor;
				 }
				 public static function peToCentimetro(valor:Number):Number
				 {
				 				valor = valor *33;
				 				return valor;
				 }
				 public static function centimetroToPe(valor:Number):Number
				 {
				 				valor = valor /33;
				 				return valor;
				 }
				 public static function peToMetros(valor:Number):Number
				 {
				 				valor = valor * 0.33;
				 				return valor;
				 }
				 public static function metroToPe(valor:Number):Number
				 {
				 				valor = valor / 0.33;
				 				return valor;
				 }
				 public static function covadoToCentimetro(valor:Number):Number
				 {
				 			valor = valor * 66;
				 			return valor;
				 }
				 public static function centimetroToCovado(valor:Number):Number
				 {
				 				valor = valor /66;
				 				return valor;
				 }
				 public static function varaToMetros(valor:Number):Number
				 {
				 					valor = valor * 1.10;
				 					return valor;
				 }
				 public static function metrosToVara(valor:Number):Number
				 {
				 					valor = valor/1.10;
				 					return valor;
				 }
				 public static function bracaToMetros(valor:Number):Number
				 {	
				 					valor = valor * 2.2;
				 					return valor;
				 }
				 public static function metroToBraca(valor:Number):Number
				 {
				 					valor = valor / 2.2;
				 					return valor;
				 }
				 public static function kmTometros(valor:Number):Number
				 {
				 						valor = valor *1000;
				 						return valor;
				 }
				 public static function metrosToKm(valor:Number):Number
				 {
				 						valor = valor /1000;
				 						return valor;
				 }
	}
		
}